<?php

if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Appbyme') > 0) {
    $Appbyme = true;
}
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') > 0) {
    $WxApp = true;
}
if ($Appbyme) {
    $TempThreadUrl = '\'' . $_G['siteurl'] . 'forum.php?mod=viewthread&tid=' . $thread['tid'] . '\'';
    $TempForumUrl = '\'' . $_G['siteurl'] . 'forum.php?mod=forumdisplay&fid=' . $forum['fid'] . '\'';
    $app_threadurl = 'href="javascript:;" onclick="sq.urlRequest(' . $TempThreadUrl . ');"';
    $app_forumurl = 'href="javascript:;" onclick="sq.urlRequest(' . $TempForumUrl . ');"';
} else {
    $app_threadurl = 'href="forum.php?mod=viewthread&tid=' . $thread[tid] . '"';
    $app_forumurl = 'href="forum.php?mod=forumdisplay&fid=' . $forum[fid] . '"';
}
if ($_G['cache']['plugin']['qu_app']['app_user'] && $Appbyme) {
    $app_userurl = 'href="javascript:;" onclick="sq.userCenter(' . $_G[uid] . ');"';
    $app_userurlist = 'href="javascript:;" onclick="sq.userCenter(' . $thread[authorid] . ');"';
} else {
    $app_userurl = 'href="home.php?mod=space&uid=' . $_G[uid] . '&do=profile&mycenter=1"';
    $app_userurlist = 'href="home.php?mod=space&uid=' . $thread[authorid] . '&do=profile"';
}